# Create your views here.
from django.template import Template,Context,RequestContext
from django.http import HttpResponse
from django.shortcuts import render_to_response

import  datetime

def ip_proc(request):
    return {'request':request,
            'message':'from leo'}
    
def hello(request):
    """ a test view to welcome the viewer"""
    tpt = Template('<html>hello there! {{ name|safe }}</html>')
    c = Context({'name':"<h1>leo</h1>"})
    html = tpt.render(c)
    return HttpResponse(html)

def timenow(request):
    time_now = datetime.datetime.now()
    return  render_to_response('time_now.html', locals(), 
                               context_instance=RequestContext(request))

def home(request):
    return render_to_response('index.html')
